/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.commons.speeder.test;

import java.util.Timer;
import java.util.TimerTask;

/**
 *
 * @author zwlin
 */
public class timertest {

	public static void main(String[] args) throws InterruptedException {
		Timer timer = new Timer();
		timer.scheduleAtFixedRate(new TimerTask() {
			int i = 0;

			@Override
			public void run() {
				System.out.println("this is the " + i++ + " th print .");
			}
		}, 0, 500);
		Thread.sleep(5000);
		timer.cancel();
	}
}
